-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: refactor AuroraTestUtility #1252
Conversation
…xied instances up
Qodana Community for JVMIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked View the detailed Qodana reportTo be able to view the detailed Qodana report, you can either:
To get - name: 'Qodana Scan'
uses: JetBrains/[email protected]
with:
upload-result: true Contact Qodana teamContact us at [email protected]
|
final TestInstanceInfo newInstance = | ||
auroraUtil.createInstance("auto-scaling-instance"); | ||
auroraUtil.createInstance(instanceClass, "auto-scaling-instance"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before these changes, the new instance was added to the TestEnvironment in a convoluted way: an earlier call to AuroraTestUtility would pass in the TestEnvironment instance list, which the class would then assign to an internal instance variable. Then, in this call, the instance list would be updated. In this PR we removed the internal instance variable. Should I change the method signature to require the TestEnvironment instance list to be passed in so that we can update it inside the function instead of relying on callers to update it themselves? It would be convenient but it also would be a side effect of calling the function
@@ -857,7 +857,7 @@ public void test_pooledConnection_differentUsers() throws SQLException { | |||
|
|||
assertThrows( | |||
HikariPool.PoolInitializationException.class, () -> { | |||
try (final Connection conn = DriverManager.getConnection( | |||
try (final Connection ignored = DriverManager.getConnection( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just fixing an intellij warning here
@@ -935,7 +953,7 @@ public void makeSureInstancesUp(List<TestInstanceInfo> instances, long timeoutSe | |||
host, | |||
instanceInfo.getPort(), | |||
dbName); | |||
try (final Connection conn = DriverManager.getConnection(url, props)) { | |||
try (final Connection ignored = DriverManager.getConnection(url, props)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just getting rid of an intellij warning here
Description
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.